<template>
	<view v-if="footer_link && footer_link.title">
		<view class="footer_box_holder"></view>
		<view class="footer_link_box" @tap="goUrl" :data-url="footer_link.url">
			<image :src=" footer_link.image_path " class="footer_link_image" mode="aspectFit"></image>
			<text class="footer_link_text">{{ footer_link.content }}</text>
		</view>
	</view>
</template>

<script>
	var _this;
	var common = require('../../utils/common.js');
	
	export default {
		name: 'villagecopyfooter',
		props: {
			footer_link: {
				type: Object,
				default: {}
			},
		},
		data() {
			return {

			}
		},
		watch: {
			options: {
				immediate: true,
				handler(new_var) {
					var _this = this;
					var options = new_var
					console.log('67 villageBindHouse', options)
					if (!options) return;
					for (var i in options) {
						this[i] = options[i]
					}
				}
			}
		},
		created() {
			_this = this;
		},
		methods: {
			goUrl: function(e) {
				console.log(e);
			
				if (e.type == 'submit') {
					common.upFormid(e);
				}
				
				var url = e.currentTarget.dataset.url;
	
				common.parseUrl(url, '', false, _this.footer_link.title);
			},
		}
	}
</script>
<style>
	.footer_box_holder{
		height:80rpx;
	}
	.footer_link_box{
		position:absolute;
		bottom: 98rpx;
		bottom: calc(98rpx + constant(safe-area-inset-bottom));
		bottom: calc(98rpx + env(safe-area-inset-bottom));
		left: 0;
		width: 100%;
		display:flex;
		align-items: center;
		justify-content: center;
		line-height: 80rpx;
	}
	.footer_link_image{
		display:inline-block;
		height:52rpx;
		width:52rpx;
		margin-right:16rpx;
	}
	.footer_link_text{
		font-size:24rpx;
		color:#999;
	}
</style>
